package cn.dust.design.pattern.creational.singleton;




import java.util.HashMap;
import java.util.Map;

/**
 * @Author: dust
 * @Date: 2019/11/26 16:07
 */
public class ContainerSingleton {

    private static Map<String,Object> singletonMap=new HashMap<String, Object>();
    public static void putInstance(String key,Object instance){

//        if(StringUtils.isNotBlank(key)&&instance!=null){
//
//            if(!singletonMap.containsKey(key)){
//                singletonMap.put(key,instance);
//            }
//
//        }
    }

    public static Object getInstance(String key){

        return singletonMap.get(key);
    }

}
